package com.wuye.entity;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Jiaofei entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "jiaofei", catalog = "test")
public class Jiaofei implements java.io.Serializable {

	// Fields

	private Integer id;
	private Users users;
	private String xiangmu;
	private double money;
	private Date shijian;

	// Constructors

	/** default constructor */
	public Jiaofei() {
	}

	/** full constructor */
	public Jiaofei(Users users, String xiangmu, double money, Date shijian) {
		this.users = users;
		this.xiangmu = xiangmu;
		this.money = money;
		this.shijian = shijian;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "usersid")
	public Users getUsers() {
		return this.users;
	}

	public void setUsers(Users users) {
		this.users = users;
	}

	@Column(name = "xiangmu")
	public String getXiangmu() {
		return this.xiangmu;
	}

	public void setXiangmu(String xiangmu) {
		this.xiangmu = xiangmu;
	}

	@Column(name = "money", precision = 255, scale = 0)
	public double getMoney() {
		return this.money;
	}

	public void setMoney(double money) {
		this.money = money;
	}

	@Column(name = "shijian", length = 0)
	public Date getShijian() {
		return this.shijian;
	}

	public void setShijian(Date shijian) {
		this.shijian = shijian;
	}

}